package com.web.service;

import com.web.dao.UserDao;
import com.web.entity.User;

/**
 * user表操作业务层
 */
public class UserService {

    private UserDao userDao = new UserDao();

    /**
     * 登录验证方法
     * @param username
     * @param password
     * @return
     */
    public boolean login(String username,String password){
        User user = userDao.get(username);
        if(user!=null&&user.getPassword().equals(password)){
            return true;
        }else{
            return false;
        }
    }


}
